// const code = 200 //返回的状态码
// Mock.setup({
//     timeout:1000 //设置请求延时时间
// })
// //mock一组数据demo
// const produceData = function(opt){
//     console.log('opt',opt);
//     let articles = [];
//     for (let i = 0; i < 6; i++) {//定义假数据生成规则
//         let newArticleObject = { //mockjs模拟随机生成6条数据
//             equ_id:'@id',
//             area_id:'@id',
//             equ_name:'@cname',
//             "equ_state|0-3": 1,
//             "equ_power|0-100.1": 1,
//             equ_scope: 500,
//             "equ_lng|116.3": 1,
//             "equ_lat|39.3": 1,
//             equ_voltage: '200v'
//         }
//         articles.push(newArticleObject)
//     }
//     //返回状态码和数据
//     return{
//         code,
//        list:articles
//     }
// }
// Mock.mock('/user/userinfo',/post|get/i,produceData);//调用模拟数据方法



Mock.mock('/user/userinfo','get',{
    'list|7':[{
    equ_id:'@id',
    area_id:'@id',
    equ_name:'@cname',
    "equ_state|0-3": 1,
    "equ_power|0-100.1": 1,
    equ_scope: 500,
    "equ_lng|116.3": 1,
    "equ_lat|39.3": 1,
    equ_voltage: '200v'
    }]
})


